package com.nancy.java_design.builder.demo1;

/**
 * 构建者模式
 * 装配者
 */
public class BikeDirector {
    private BikeBuilder bikeBuilder;

    public BikeDirector(BikeBuilder bikeBuilder) {
        this.bikeBuilder = bikeBuilder;
    }

    public Bike construct() {
        bikeBuilder.buildSeat();
        bikeBuilder.buildFrame();
        return bikeBuilder.getBike();
    }
}
